package service.impl;

import mapper.UserMapper;
import org.springframework.stereotype.Service;
import pojo.DevUser;
import pojo.User;
import service.UserService;

import javax.annotation.Resource;

/**
 * Created by Dell on 2019/1/12.
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    UserMapper userMapper;

    public Boolean getUserLogin(User user) {
        if(userMapper.getUserLogin(user)!=null){
            return true;
        }
        return false;
    }


    public User getUserByusername(String username){
         return this.userMapper.selectLogin(username);
    }

    public int addUserInfo(User user){
       int record=userMapper.addUserInfo(user);
       return record;
    }

    @Override
    public DevUser loginDev(DevUser devUser) {
        return userMapper.loginDev(devUser);
    }

    @Override
    public Integer count() {
        return userMapper.count();
    }

    @Override
    public User loginBack(User user) {
        return userMapper.loginBack(user);
    }


}
